package com.songcan.common.exception;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.songcan.common.serializer.Auth2ExceptionSerializer;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

@JsonSerialize(using = Auth2ExceptionSerializer.class)
public class AuthException  extends OAuth2Exception {

    @Getter
    private String code;

    public AuthException(String msg) {
        super(msg);
    }

    public AuthException(String msg, String errorCode) {
        super(msg);
        this.code = errorCode;
    }


}
